home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------------------------------
- // mesh_debug_Artefacts.fx
- //
- // file type: Shader File
- // Usage : line rendering
- //
- //------------------------------------------------------------------------------------------------------
-
- #include "shared.fx"
- #include "lighting.fx"
- #define FOG_DISABLE
- #include "fog.fx"
-
- float4 Color;
- float LineWidth;
-
- //------------------------------------
- struct vertexInput {
- float4 Position : POSITION;
- float3 Color : TEXCOORD0;
- };
-
- struct vertexOutput {
- float4 Position : POSITION;
- float4 Diffuse : COLOR0;
- FOG_OPTION_VERTEX_FIELD
- };
-
- //------------------------------------
- vertexOutput VS_Debug_Line_Tranform(vertexInput input)
- {
- vertexOutput output;
- output.Position = mul (input.Position,CameraProjection);
- // output.Position.xyz = input.Position;
- // output.Position.w = 1.0f;
- output.Diffuse.xyz = input.Color.xyz;
- output.Diffuse.w = 1.0f;
-
- // fog computation
- FOG_OPTION_COMPUTE(output, output.Position);
-
- return output;
- }
-
- //-----------------------------------
- technique LineRendering
- <
- int Priority = 10;
- int NeedSorting = 1;
- int TechniqueIndex = 0;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- CullMode = NONE;
- ZEnable = false;
- //ZFunc = LESSEQUAL;
- //ZWriteEnable = true;
- AlphaBlendEnable = false;
- FOG_OPTION_PARAMETERS;
-
-
- VertexShader = compile vs_1_1 VS_Debug_Line_Tranform();
-
- // Just use the color
- PixelShader =
- asm
- {
- ps_1_1
-
- mov r0, v0
- };
- }
- }
-
-
- technique LineRenderingWithZ
- <
- int Priority = 10;
- int NeedSorting = 1;
- int TechniqueIndex = 1;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- CullMode = NONE;
- ZEnable = true;
- ZFunc = LESSEQUAL;
- ZWriteEnable = false;
- AlphaBlendEnable = false;
- FOG_OPTION_PARAMETERS;
-
- VertexShader = compile vs_1_1 VS_Debug_Line_Tranform();
-
- // Just use the color
- PixelShader =
- asm
- {
- ps_1_1
-
- mov r0, v0
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- #include "mesh_shadow.fx"
- #include "mesh_shadow_projector.fx"
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------